# Maintainer: lauren n. liberda <lauren@selfisekai.rocks>
pkgname=typst-lsp
pkgver=0.12.1
pkgrel=0
pkgdesc="Language server for typst"
url="https://github.com/nvarner/typst-lsp"
# typst, rust-analyzer
arch="aarch64 ppc64le x86_64"
license="MIT"
depends="rust-analyzer"
makedepends="
	cargo
	cargo-auditable
	openssl-dev
	"
source="
	https://github.com/nvarner/typst-lsp/archive/refs/tags/v$pkgver/typst-lsp-$pkgver.tar.gz
	"
options="net !check" # no tests

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build \
		--release \
		--frozen \
		--no-default-features \
		--features=remote-packages,native-tls
}

package() {
	install -Dm755 target/release/typst-lsp -t "$pkgdir"/usr/bin/
}

sha512sums="
69234993c76d778f91ddd097c011aca23eb4c9cb0fc6bfaf7c0bd8cfe42e8ceb560babcc1c7b89f551c2f21a17a8f1d22e88a9e7c281025007e97f6da0d4d94c  typst-lsp-0.12.1.tar.gz
"
